3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
Raw data is used to store information that is platform-dependent or is inherently not alphanumeric.
In a text file, raw data is stored as hexadecimal strings prefixed by the characters ' 0x ' . Strings of raw data are not padded in text files. However, your application may pad them if you wish.
In a binary file, raw data is stored as sequences of bytes, padded to a 4-byte boundary. The size of raw data is computed as follows (the computation differs from that for string in that raw data doesn't require a terminating \0):
remainder = radDataSize % 4;
pad = ( (remainder > 0) ? (4 - remainder) : 0 );
size = radDataSize + pad;
Previous | QD3D Book | Overview | Chapter Contents | Next |